Placing button to left of Close button on form

I am creating a form which contains a Close button created with the close() function and I want to place another user-defined button next to it (on the left side).  How do I do that?  I'm not sure how to point to the Close button since we don't use a named variable for it.

 

Chris


Christopher Cote - Mon Sep 23 13:59:00 EDT 2019

Re: Placing button to left of Close button on form
Don Fowler - Mon Sep 23 17:25:53 EDT 2019

I'm going for the easy one:

apply(DB box, string label, void callback(DB))

adds a button to the row of standard buttons at the bottom of the Dialog Box. (to the left of the Close button, as requested). the callback is what you want to execute when the button is pressed. it must be loaded before executing.

Example:

DB mainBox = centered "Just Button"
void doSomething(DB mainBox){
        ack "You successfully created a button function"
}
apply(mainBox, "Press Me", doSomething)
show mainBox

Hope this is what you were looking for.

 

Re: Placing button to left of Close button on form
Mike.Scharnow - Tue Sep 24 03:35:40 EDT 2019

Apart from Don's answer: the standard buttons (close, apply, ok) will always bei printed in one row reserved only for the standard buttons

All addiitional buttons ("button") will be shown where you placed them. If you want an additional button in the same row where the "close" button is, you will have to create your own "close" button as a "button".

 

Note that you can create more than one "apply" button, perhaps this suits your needs.